package se392.ateam2006.meetingmgmt;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import javax.ejb.CreateException;
import javax.ejb.FinderException;
import javax.ejb.Local;
import javax.ejb.Remote;
import java.util.GregorianCalendar;

import se392.ateam2006.meetingmgmt.meeting.MeetingEntity;
import se392.ateam2006.meetingmgmt.meeting.Duration;
import se392.ateam2006.resourcemgmt.room.RoomEntity;
import se392.ateam2006.user.UserEntity;
import se392.ateam2006.resourcemgmt.participant.ParticipationEntity;

/**
 * Remote interface for the MeetingMgmtBean - allows access from a different JVM
 * @author Ateam (Matthew Bennett, Claire Melton, Shingai Manyiwa, John Adderley)
 * @version 25/03/07
 */
@Remote 
public interface MeetingMgmtRemote extends Serializable {
    
    void createMeeting(UserEntity initiator, String id, String title, String description,
                      GregorianCalendar startDateRange, GregorianCalendar endDateRange,
                      Duration duration, int roomSize, String equipment, RoomEntity room) throws CreateException;

    Collection<MeetingEntity> findMeetings(String userId);
    
    void deleteMeetingById(String id);
    
    void deleteMeeting(MeetingEntity me);
    
    void removeAllMeetings();
    
    Collection getAllMeetings();

    Collection getBookedMeetings();

    int getMeetingCount();

    void removeAllEquipment();
    
    void setMeetingAsBooked(String meetingId, boolean booked);
    
    Collection findMeetingsByInitiator(UserEntity user);
    
    MeetingEntity findMeetingById(String id);

    Duration createDuration(int days, int hours, int mins) throws CreateException;
    
    Duration findDurationByID(long id);

    /**
     * Retrieves value that MeetingEntity should use as default cutoff period 
     * 
     * @return the current default cutoff period
     */
    int getDefaultCutOffPeriod();

    /**
     * Sets the value that Meetings should default to as response cutoff
     * 
     * @param aDefaultCutOffPeriod - int, the new cutoff period
     */
    void setDefaultCutOffPeriod(int aDefaultCutOffPeriod);
    
}
